

@RestController
@RequestMapping("/dmsNetworkLockRule")
public class DmsNetworkLockRuleController {

    @Resource
    private DmsNetworkLockRuleService dmsNetworkLockRuleService;


    /**
     * 获取 DmsNetworkLockRule 分页列表
     */
    @GetMapping("/pagination")
    public Ret getDmsNetworkLockRulePagination( PaginationVo paginationVo, DmsNetworkLockRuleQuery dmsNetworkLockRuleQuery ) throws Exception {
        IPage page = dmsNetworkLockRuleService.getDmsNetworkLockRulePagination(paginationVo, dmsNetworkLockRuleQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 DmsNetworkLockRule 所有数据
     */
    @GetMapping("/all")
    public Ret getDmsNetworkLockRuleAllList( DmsNetworkLockRuleQuery dmsNetworkLockRuleQuery ) throws Exception {
        List<DmsNetworkLockRuleEntity> list = dmsNetworkLockRuleService.getDmsNetworkLockRuleAllList( dmsNetworkLockRuleQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 DmsNetworkLockRule 详情
    */
   @GetMapping("/{id}")
   public Ret getDmsNetworkLockRuleDetail(@PathVariable Long id) throws Exception {

       DmsNetworkLockRuleEntity dmsNetworkLockRule = dmsNetworkLockRuleService.getDmsNetworkLockRuleDetail(id);
       return Ret.ok(dmsNetworkLockRule);
   }


    /**
     * 新增 DmsNetworkLockRule
     * */
    @PostMapping("")
    public Ret addDmsNetworkLockRule(@RequestBody DmsNetworkLockRuleVo dmsNetworkLockRuleVo) throws Exception {

        dmsNetworkLockRuleService.addDmsNetworkLockRule(dmsNetworkLockRuleVo);
        return Ret.ok();
    }


    /**
     * 更新 DmsNetworkLockRule
     * */
    @PutMapping("")
    public Ret updateDmsNetworkLockRule(@RequestBody DmsNetworkLockRuleVo dmsNetworkLockRuleVo) throws Exception {

        dmsNetworkLockRuleService.updateDmsNetworkLockRule(dmsNetworkLockRuleVo);
        return Ret.ok();
    }


    /**
     * 删除 DmsNetworkLockRule
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveDmsNetworkLockRule( @RequestBody List<Long> ids ) throws Exception {

        dmsNetworkLockRuleService.batchRemoveDmsNetworkLockRule(ids);
        return Ret.ok();
    }
}

  